﻿using System;
using System.Diagnostics;
using System.Diagnostics.Contracts;

namespace CardGamesLibrary.Cards
{
    [ContractClassFor(typeof(ICardPile<>))]
    public abstract class ICardPileContract<TCard> : ICardPile<TCard> 
        where TCard : Card
    {
        public int IndexOf(TCard item)
        {
            Contract.Requires(item != null);
            return default(int);
        }

        public void Insert(int index, TCard item)
        {
            Contract.Requires(index >= 0 && index < Count);
            Contract.Requires(item != null);
        }

        public void RemoveAt(int index)
        {
            Contract.Requires(index >= 0 && index < Count);
        
            throw new NotImplementedException();
        }

        public void Add(TCard item)
        {
            Contract.Requires(item != null);
            
        }

        public bool CanAdd(TCard item)
        {
            Contract.Requires(item != null);
            return false;
        }

        public void Clear()
        {
            throw new NotImplementedException();
        }

        public bool Contains(TCard item)
        {
            Contract.Requires(item != null);
            return false;
        }

        public int Count
        {
            get { return 0; }
        }

        public bool Remove(TCard item)
        {
            Contract.Requires(item != null);
            return false;
        }
    }
}